package unit5.collection.myQueue;

import java.util.LinkedList;

public class MyQueue {
    private LinkedList list=new LinkedList();//创建对象

    //入队
    public void put(Object Q){
        list.addLast(Q);
    }

    //出队
    public Object get(){
        return list.removeFirst();
    }

    //栈大小
    Object dx(){
        Object h=list.size();
        return h;
    }

    //判断队空
    public boolean empty(){
        return list.isEmpty();
    }
}
